using System.Net;

namespace FastSocket.Server
{
    /// <summary>
    /// udp server interface
    /// </summary>
    public interface IUdpServer
    {
        /// <summary>
        /// 开始
        /// </summary>
        void Start();

        /// <summary>
        /// 结束
        /// </summary>
        void Stop();

        /// <summary>
        /// 发送
        /// </summary>
        /// <param name="endpoint"></param>
        /// <param name="payload"></param>
        void SendTo(EndPoint endpoint, byte[] payload);
    }

    /// <summary>
    /// udp server interface
    /// </summary>
    /// <typeparam name="TMessage"></typeparam>
    public interface IUdpServer<TMessage> : IUdpServer where TMessage : class, Messaging.IMessage
    {
    }
}